import axios from 'axios'
import { request } from '@/utils/request'

//项目 获得分页数据项
export function GetPagedList(data) {
    const url = request.baseURL + '/api/wap/Projects/Index';

    return axios.get(url, {
        params: data
    }).then((res) => {
        return Promise.resolve(res.data);
    });
};


//项目 详情
export function GetDetail(id) {
    const url = request.baseURL + '/api/wap/Projects/Detail';
    const data = {
        id: id,
        callback: 'callback'
    };
    return axios.get(url, {
        params: data
    }).then((res) => {
        return Promise.resolve(res.data);
    });
};
//展开参加该项目的筑功者
export function JoinedMember(id, pageIndex) {
    const url = request.baseURL + '/api/wap/Projects/JoinedMember';
    const data = {
        id: id,
        pageIndex: pageIndex,
        callback: 'callback'
    };
    return axios.get(url, {
        params: data
    }).then((res) => {
        return Promise.resolve(res.data);
    });
};
//项目评估
export function ProjectEvaluation(proId, type) {
    const url = request.baseURL + '/api/wap/Projects/ProjectEvaluation';
    const data = {
        proId: proId,
        type: type,
        callback: 'callback'
    };
    return axios.get(url, {
        params: data
    }).then((res) => {
        return Promise.resolve(res.data);
    });
};
//获取项目经验
export function GetExprience(id,pid) {
    const url = request.baseURL + '/api/wap/Projects/GetExprience';
    const data = {
        uid:id,
        pid:pid,
        callback: 'callback'
    };
    return axios.get(url, {
        params: data
    }).then((res) => {
        return Promise.resolve(res.data);
    });
};
//


